package com.smile.api;

import com.smile.commons.page.R;
import com.smile.model.request.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "smile-plus-standalone-device", contextId = "payload", path = "/api/device")
public interface PayloadApi {

    /**
     * 获取负载控制
     *
     * @param payloadAuthorityGrabRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/payloadAuthorityGrab")
    R<Void> payloadAuthorityGrab(@RequestBody PayloadAuthorityGrabRequest payloadAuthorityGrabRequest) throws Exception;

    /**
     * 开始拍照
     *
     * @param cameraPhotoTakeRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraPhotoTake")
    R<Void> cameraPhotoTake(@RequestBody CameraPhotoTakeRequest cameraPhotoTakeRequest) throws Exception;

    /**
     * 结束拍照
     *
     * @param cameraPhotoStopRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraPhotoStop")
    R<Void> cameraPhotoStop(@RequestBody CameraPhotoStopRequest cameraPhotoStopRequest) throws Exception;

    /**
     * 关闭直播
     *
     * @param liveStopPushRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/liveStopPush")
    R<Void> liveStopPush(@RequestBody LiveStopPushRequest liveStopPushRequest) throws Exception;

    /**
     * 开始摄像
     *
     * @param cameraRecordStartRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraRecordingStart")
    R<Void> cameraRecordingStart(@RequestBody CameraRecordStartRequest cameraRecordStartRequest) throws Exception;

    /**
     * 停止摄像
     *
     * @param cameraRecordStopRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraRecordingStop")
    R<Void> cameraRecordingStop(@RequestBody CameraRecordStopRequest cameraRecordStopRequest) throws Exception;

//    /**
//     * 画面拖动控制
//     * @param cameraScreenDragRequest
//     * @return
//     * @throws Exception
//     */
//    R<Void> cameraScreenDrag(@RequestBody CameraScreenDragRequest cameraScreenDragRequest) throws Exception;
}
